Ext.define('Usws.view.userAttr.UserAttr', {
    extend: 'Ext.grid.Panel',
    xtype: 'UserAttr-Grid',
    store: 'UserAttr',
    title: '用户扩展属性信息',
    selType:'checkboxmodel',//设定选择模式  
    multiSelect:true,//运行多选  
    stateId: 'sysStateGrid',
    layout:'column',
    autoScroll: true,
    initComponent: function () {
    	this.tbar = [
    	               { xtype: 'button', text: '添加用户扩展属性',  action: 'add'},
    	               { xtype: 'button', text: '批量删除',  action: 'deleteMore'}
    	            ];
        this.columns = [
            {text : 'UID', width : '10%', sortable : true, dataIndex: 'uid', hidden: true}
,{text : '省', width : '10%', sortable : true, dataIndex: 'provinceCode', hidden: false}
,{text : '市', width : '10%', sortable : true, dataIndex: 'cityCode', hidden: false}
,{text : '区', width : '10%', sortable : true, dataIndex: 'strictCode', hidden: false}
,{text : '手机号码', width : '10%', sortable : true, dataIndex: 'mobileNo', hidden: false}
,{text : '详细地址', width : '10%', sortable : true, dataIndex: 'contactAddr', hidden: false}
,{text : '生日', width : '10%', sortable : true, dataIndex: 'birthDate', hidden: false}
,{text : 'QQ', width : '10%', sortable : true, dataIndex: 'qqNo', hidden: false}

            , {
	            text:'操作',
	            sortable: false,
	            xtype: 'actioncolumn',
	            margin:'5px',
	            align:'center',
	            width : '10%',
	            items: [{
	            	icon: '/ext4/resources/images/cog_edit.png',  // Use a URL in the icon config
	                tooltip: '编辑',
	                action: 'edit',
	                handler: function(grid,rowIndex,colIndex,item,e) {
	                	this.fireEvent('itemclick', this, grid, rowIndex, colIndex, item, e);
	                }
	            },'-',{
	                icon: '/ext4/resources/images/delete.gif',
	                tooltip: '删除',
	                action: 'delete',
	                handler: function(grid,rowIndex,colIndex,item,e) {
	                	this.fireEvent('itemclick', this, grid, rowIndex, colIndex, item, e);
	                }
	            }]
            }];
        this.bbar= {
            xtype: 'pagingtoolbar',
            store: 'UserAttr',
            pageSize: 16,
            displayInfo: true,
            firstText:'首页',
            prevText:'上一页',
            nextText:'下一页',
            beforePageText:'第',
            afterPageText:'共  {0} 页',
            displayMsg: '显示第 {0} 条到 {1} 条记录，一共 {2} 条', 
            emptyMsg: "没有记录",
            refreshText:'刷新',
            lastText:'未页'
        };
        this.callParent();
    }
});